/*
 * G2OStatus.cpp
 *
 *  Created on: Sep 30, 2016
 *      Author: ubuntu
 */

#include <time.h>
#include <stdio.h>
#include <stdlib.h>

#include "../Conf.h"
#include "../common.h"
#include "G2OStatus.h"

G2OStatus::G2OStatus(const char *obdid) : Status()
{
	memset(m_obdid, 0, sizeof(m_obdid));
	strncpy(m_obdid, obdid, sizeof(m_obdid));
	type = 1;
	starttime = time(NULL);
	stoptime = time(NULL);
	lng_end = 0;
	lat_end = 0;
	lasttime = 0;
	version = 0;
	updateable = 1;
}

G2OStatus::~G2OStatus()
{

}

void G2OStatus::init(int tp, time_t start, time_t stop, double lng, double lat, time_t last, int vsn)
{
	type = tp;
	starttime = start;
	stoptime = stop;
	lng_end = lng;
	lat_end = lat;
	lasttime = last;
	version = vsn;
}

const char *G2OStatus::getObdid()
{
	return m_obdid;
}
